package com.jy.rhin.facade.ws.document.subscribe;

import org.oasis_open.docs.wsn.b_2.*;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;

import static com.jy.rhin.config.NamespaceConstants.NS_B2;

@WebService(targetNamespace = NS_B2, name = "DocumentSubAndPub")
@XmlSeeAlso({org.oasis_open.docs.wsrf.bf_2.ObjectFactory.class, org.oasis_open.docs.wsn.b_2.ObjectFactory.class, org.oasis_open.docs.wsn.t_1.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface DocumentSubAndPub {

    /**
     * 文档订阅
     *
     * @param message
     * @return
     */
    @WebMethod(operationName = "DocumentSubscribe", action = "DocumentSubscribe")
    @WebResult(name = "SubscribeResponse", targetNamespace = NS_B2, partName = "message")
    SubscribeResponse documentSubscribe(

            @WebParam(partName = "message", name = "Subscribe", targetNamespace = NS_B2)
                    Subscribe message
    );

    /**
     * 取消文档订阅
     *
     * @param message
     * @return
     */
    @WebMethod(operationName = "DocumentUnSubscribe", action = "DocumentUnSubscribe")
    @WebResult(name = "UnsubscribeResponse", targetNamespace = NS_B2, partName = "message")
    UnsubscribeResponse documentUnSubscribe(

            @WebParam(partName = "message", name = "Unsubscribe", targetNamespace = NS_B2)
                    Unsubscribe message
    );

    /**
     * 暂停文档订阅
     *
     * @param message
     * @return
     */
    @WebMethod(operationName = "DocumentPauseSubscribe", action = "DocumentPauseSubscribe")
    @WebResult(name = "PauseSubscriptionResponse", targetNamespace = NS_B2, partName = "message")
    PauseSubscriptionResponse documentPauseSubscribe(

            @WebParam(partName = "message", name = "PauseSubscription", targetNamespace = NS_B2)
                    PauseSubscription message
    );

    /**
     * 恢复文档订阅
     *
     * @param message
     * @return
     */
    @WebMethod(operationName = "DocumentResumeSubscribe", action = "DocumentResumeSubscribe")
    @WebResult(name = "ResumeSubscriptionResponse", targetNamespace = NS_B2, partName = "message")
    ResumeSubscriptionResponse documentResumeSubscribe(

            @WebParam(partName = "message", name = "ResumeSubscription", targetNamespace = NS_B2)
                    ResumeSubscription message
    );

}
